﻿<%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %>
<%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %>
<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %>

<%@ Register TagPrefix="wssuc" TagName="LinksTable" src="/_controltemplates/LinksTable.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormSection" src="/_controltemplates/InputFormSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="InputFormControl" src="/_controltemplates/InputFormControl.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="LinkSection" src="/_controltemplates/LinkSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ButtonSection" src="/_controltemplates/ButtonSection.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ActionBar" src="/_controltemplates/ActionBar.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ToolBar" src="/_controltemplates/ToolBar.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="ToolBarButton" src="/_controltemplates/ToolBarButton.ascx" %>
<%@ Register TagPrefix="wssuc" TagName="Welcome" src="/_controltemplates/Welcome.ascx" %>
<%@ Register Tagprefix="wssawc" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

<%@ Import Namespace="Microsoft.SharePoint" %>
<%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EditListColumnPermissions.aspx.cs" Inherits="SharePointListSecurity.Layouts.SharePointListSecurity.EditListColumnPermissions" DynamicMasterPageFile="~masterurl/default.master" %>

<asp:Content ID="PageHead" ContentPlaceHolderID="PlaceHolderAdditionalPageHead" runat="server">

</asp:Content>

<asp:Content ID="Main" ContentPlaceHolderID="PlaceHolderMain" runat="server">
    <script type="text/javascript">
        function confirmdelete()
        {
            return confirm('<asp:Literal runat="server" Text="<%$Resources:ListSecurityResource,DelteAllFieldPermission%>" />');
        }
    </script>
    <table border="0" cellspacing="0" cellpadding="0" class="ms-propertysheet" width="100%">
        <colgroup>
            <col ></col>
            <col style="width: 416px;"></col>
        </colgroup>
        <tr>
            <td>
                <wssuc:InputFormSection ID="displayPermissionSection" runat="server"
                        Title="<%$Resources:ListSecurityResource,DisplayViewPermissions%>"
                        Description="<%$Resources:ListSecurityResource, DisplayPermissionSectionDescription%>" >
                        <template_inputformcontrols>
                            <wssuc:InputFormControl runat="server" LabelText="<%$Resources:ListSecurityResource, Permission%>">
                                <Template_Control>                   
                                    <div class="ms-authoringcontrols">
                                        <asp:DropDownList ID="ddlDisplayPermissions" Width="100" runat="server">
                                            <asp:ListItem Text="<%$Resources:ListSecurityResource, Deny%>" Value="Hide Field" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$Resources:ListSecurityResource, Allow%>" Value="Show Field"></asp:ListItem>
                                        </asp:DropDownList>                             
                                    </div>
                                </Template_Control>
                            </wssuc:InputFormControl>
                            <wssuc:InputFormControl runat="server" LabelText="<%$Resources:ListSecurityResource, UsersAndGroups%>">
                                <Template_Control>                   
                                    <div class="ms-authoringcontrols">
                                           <wssawc:PeopleEditor AllowEmpty=true  ValidatorEnabled="true"  id="pplDisplayPermissions" runat="server" ShowCreateButtonInActiveDirectoryAccountCreationMode=true SelectionSet="User,SecGroup,SPGroup" />
                                    </div>
                                </Template_Control>
                            </wssuc:InputFormControl>
                        </template_inputformcontrols>
                </wssuc:InputFormSection>
            </td>
        </tr>
        <tr>
            <td>
                <wssuc:InputFormSection ID="editPermissionSection" runat="server"
                        Title="<%$Resources:ListSecurityResource, EditViewPermissions%>"
                        Description="<%$Resources:ListSecurityResource, editPermissionDescription%>" >
                        <template_inputformcontrols>
                            <wssuc:InputFormControl runat="server" LabelText="Permission:">
                                <Template_Control>                   
                                    <div class="ms-authoringcontrols">
                                        <asp:DropDownList ID="ddlEditPermissions" Width="100" runat="server">
                                            <asp:ListItem Text="<%$Resources:ListSecurityResource, Deny%>" Value="Hide Field" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$Resources:ListSecurityResource, Allow%>" Value="Show Field"></asp:ListItem>
                                        </asp:DropDownList>                             
                                    </div>
                                </Template_Control>
                            </wssuc:InputFormControl>
                            <wssuc:InputFormControl runat="server" LabelText="<%$Resources:ListSecurityResource, UsersAndGroups%>">
                                <Template_Control>                   
                                    <div class="ms-authoringcontrols">
                                           <wssawc:PeopleEditor AllowEmpty=true	ValidatorEnabled="true"	id="pplEditPermissions"	runat="server" ShowCreateButtonInActiveDirectoryAccountCreationMode=true SelectionSet="User,SecGroup,SPGroup"/>
                                    </div>
                                </Template_Control>
                            </wssuc:InputFormControl>
                        </template_inputformcontrols>
                </wssuc:InputFormSection>
            </td>
        </tr>
        <tr>
            <td>
                <wssuc:InputFormSection ID="editDisplayModeSection" runat="server"
                        Title="<%$Resources:ListSecurityResource,EditViewDisplayMode%>"
                        Description="<%$Resources:ListSecurityResource, EditDisplayDescription%>" >
                        <template_inputformcontrols>
                            <wssuc:InputFormControl runat="server" LabelText="<%$Resources:ListSecurityResource, DisplayMode%>">
                                <Template_Control>                   
                                    <div class="ms-authoringcontrols">
                                        <asp:DropDownList ID="ddlEditDisplayMode" Width="100" runat="server">
                                            <asp:ListItem Text="<%$Resources:ListSecurityResource, ReadOnly%>" Value="ReadOnly" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$Resources:ListSecurityResource, Editable%>"  Value="Editable"></asp:ListItem>
                                        </asp:DropDownList>                             
                                    </div>
                                </Template_Control>
                            </wssuc:InputFormControl>
                            <wssuc:InputFormControl runat="server" LabelText="<%$Resources:ListSecurityResource,UsersAndGroups%>">
                                <Template_Control>                   
                                    <div class="ms-authoringcontrols">
                                           <wssawc:PeopleEditor	AllowEmpty=true	ValidatorEnabled="true"	id="pplEditDisplayMode"	runat="server" ShowCreateButtonInActiveDirectoryAccountCreationMode=true SelectionSet="User,SecGroup,SPGroup"/>
                                    </div>
                                </Template_Control>
                            </wssuc:InputFormControl>
                        </template_inputformcontrols>
                </wssuc:InputFormSection>
            </td>
        </tr>
        <tr>
            <td>
                <wssuc:InputFormSection ID="addPermissionSection" runat="server"
                        Title="<%$Resources:ListSecurityResource,AddViewPermissions%>"
                        Description="<%$Resources:ListSecurityResource, AddPermissionDescription%>" >
                        <template_inputformcontrols>
                            <wssuc:InputFormControl runat="server" LabelText="<%$Resources:ListSecurityResource, Permission%>">
                                <Template_Control>                   
                                    <div class="ms-authoringcontrols">
                                        <asp:DropDownList ID="ddlAddPermissions" Width="100" runat="server">
                                            <asp:ListItem Text="<%$Resources:ListSecurityResource, Deny%>" Value="Hide Field" Selected="True"></asp:ListItem>
                                            <asp:ListItem Text="<%$Resources:ListSecurityResource, Allow%>" Value="Show Field"></asp:ListItem>
                                        </asp:DropDownList>                             
                                    </div>
                                </Template_Control>
                            </wssuc:InputFormControl>
                            <wssuc:InputFormControl runat="server" LabelText="<%$Resources:ListSecurityResource, UsersAndGroups%>">
                                <Template_Control>                   
                                    <div class="ms-authoringcontrols">
                                           <wssawc:PeopleEditor AllowEmpty=true ValidatorEnabled="true" id="pplAddPermissions" runat="server" ShowCreateButtonInActiveDirectoryAccountCreationMode=true SelectionSet="User,SecGroup,SPGroup" />                       
                                    </div>
                                </Template_Control>
                            </wssuc:InputFormControl>
                        </template_inputformcontrols>
                </wssuc:InputFormSection>
            </td>
        </tr>
                    <tr>
                <td class="ms-sectionline" height="2" colspan="2"><img alt="" src="/_layouts/images/blank.gif" width="1" height="1"></td>
            </tr>
            <tr>
                <td class="ms-descriptiontext" height="10" colspan="2"><img alt="" src="/_layouts/images/blank.gif" width="1" height="10"></td>
            </tr>

            <tr>
                <td colspan="2">
                    <table cellspacing="0" cellpadding="0" width="100%">
                        <colgroup>
                            <col width="99%">
                            <col width="1%">
                        </colgroup>
                        <tbody>
                            <tr>
                                <td>&nbsp;</td>
                                <td nowrap>
                                    <asp:Button CssClass="ms-ButtonHeightWidth" OnClick="DeltePermissions_Click" AccessKey="O" OnClientClick="return confirmdelete();" ID="DeltePermissions" runat="server" Text="<%$Resources:ListSecurityResource, Delete%>" />
                                    <span class="ms-SpaceBetButtons">
                                        <img src="/_layouts/images/blank.gif" width="60" height="1">
                                        <span class="ms-SpaceBetButtons">
                                            <asp:Button CssClass="ms-ButtonHeightWidth" OnClick="SavePermissions_Click" AccessKey="O" ID="SavePermissions" runat="server" Text="OK" />
                                            <input class="ms-ButtonHeightWidth" id="oneditCancelItem" accesskey="c" type="button" value="<SharePoint:EncodedLiteral runat='server' text='<%$Resources:wss,multipages_cancelbutton_text%>' EncodeMethod='HtmlEncode'/>" onclick="if (typeof (window.frameElement) != 'undefined' && window.frameElement != null) { window.frameElement.cancelPopUp(); return false; } if (window.history.length > 0) { window.history.back(); return false; } else { return false; }" />
                                        </span>
                                    </span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
    </table>
</asp:Content>

<asp:Content ID="PageTitle" ContentPlaceHolderID="PlaceHolderPageTitle" runat="server">
        <%=spList.Title%> - <%=spField.Title %>  <asp:Literal runat="server" Text="<%$Resources:ListSecurityResource, Permissions%>" />
</asp:Content>

<asp:Content ID="PageTitleInTitleArea" ContentPlaceHolderID="PlaceHolderPageTitleInTitleArea" runat="server">
    <a id=onetidListHlink href=<%SPHttpUtility.AddQuote(SPHttpUtility.UrlPathEncode(spList.DefaultViewUrl,true),Response.Output);%>><%SPHttpUtility.HtmlEncode(spList.Title,Response.Output);%></a>&#32;<SharePoint:ClusteredDirectionalSeparatorArrow ID="ClusteredDirectionalSeparatorArrow1" runat="server" />
    <a href=<%SPHttpUtility.AddQuote(SPHttpUtility.UrlPathEncode(this.Web.Url + "/_layouts/listedit.aspx?List=" + spList.ID.ToString(), true), Response.Output);%>> <SharePoint:FormattedStringWithListType ID="FormattedStringWithListType1" runat="server" String="<%$Resources:wss,listsettings_titleintitlearea%>" LowerCase="false" /></a>&#32;<SharePoint:ClusteredDirectionalSeparatorArrow ID="ClusteredDirectionalSeparatorArrow2" runat="server" />
    <a href=<%SPHttpUtility.AddQuote(SPHttpUtility.UrlPathEncode(this.Web.Url + "/_layouts/sharePointlistSecurity/listcolumnpermissions.aspx?List={" + spList.ID.ToString() + "}", true), Response.Output);%>> <SharePoint:FormattedStringWithListType ID="FormattedStringWithListType2" runat="server" String="Columns Permissions" LowerCase="false" /></a>&#32;<SharePoint:ClusteredDirectionalSeparatorArrow ID="ClusteredDirectionalSeparatorArrow3" runat="server" />
	<%=spField.Title%>
</asp:Content>